home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * stdio.h
- *
- * Copyright (c) 1989 Symantec Corporation. All rights reserved.
- *
- */
-
- #define _H_stdio
-
- #ifndef NULL
- #define NULL ((void *) 0)
- #endif
-
- #if 0
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef FALSE
- #define FALSE 0
- #endif
- #endif
-
- #ifndef __size_t
- #define __size_t
- typedef unsigned long size_t;
- #endif
-
- typedef enum { false, true, FALSE = 0, TRUE } Boolean;
-
- typedef unsigned long fpos_t;
-
- typedef struct {
- unsigned std : 1;
- unsigned binary : 1;
- unsigned eof : 1;
- unsigned err : 1;
- unsigned dirty : 1;
- unsigned mybuf : 1;
- unsigned append : 1;
- unsigned delete : 1;
- unsigned pushed : 1;
- char one;
- unsigned char pushc;
- short refnum;
- char *buf;
- size_t size;
- unsigned char *ptr;
- size_t cnt;
- fpos_t pos;
- fpos_t len;
- void *window;
- int (*proc)();
- } FILE;
-
- #define _IOFBF 0
- #define _IOLBF 1
- #define _IONBF 2
-
- #define BUFSIZ 512
- #define EOF (-1)
- #define FOPEN_MAX 15
-
- #define FILENAME_MAX 256
- #define L_tmpnam 20
- #define TMP_MAX 9999
-
- #define SEEK_SET 0
- #define SEEK_CUR 1
- #define SEEK_END 2
-
- #define stdin (&__file[0])
- #define stdout (&__file[1])
- #define stderr (&__file[2])
-
- extern FILE __file[FOPEN_MAX];
-
- int remove(char *);
- int rename(char *, char *);
- FILE *tmpfile(void);
- char *tmpnam(char *);
-
- int fclose(FILE *);
- int fflush(FILE *);
- FILE *fopen(char *, char *);
- FILE *freopen(char *, char *, FILE *);
- void setbuf(FILE *, char *);
- int setvbuf(FILE *, char *, int, size_t);
-
- int fprintf(FILE *, char *, ...);
- int fscanf(FILE *, char *, ...);
- int printf(char *, ...);
- int scanf(char *, ...);
- int sprintf(char *, char *, ...);
- int sscanf(char *, char *, ...);
- int vfprintf(FILE *, char *, void *);
- int vprintf(char *, void *);
- int vsprintf(char *, char *, void *);
- int _vscanf(char *, void *);
- int _vsscanf(char *, char *, void *);
- int _vfscanf(FILE *, char *, void *);
-
- int fgetc(FILE *);
- char *fgets(char *, int, FILE *);
- int fputc(int, FILE *);
- int fputs(char *, FILE *);
- int getc(FILE *);
- int getchar(void);
- char *gets(char *);
- int putc(int, FILE *);
- int putchar(int);
- int puts(char *);
- int ungetc(int, FILE *);
-
- size_t fread(void *, size_t, size_t, FILE *);
- size_t fwrite(void *, size_t, size_t, FILE *);
-
- int fgetpos(FILE *, fpos_t *);
- int fseek(FILE *, long, int);
- int fsetpos(FILE *, fpos_t *);
- long ftell(FILE *);
- void rewind(FILE *);
-
- void clearerr(FILE *);
- int feof(FILE *);
- int ferror(FILE *);
- void perror(char *);
-
- int __getc(FILE *);
- int __putc(int, FILE *);
-
- #define getc(fp) ((fp)->cnt-- ? (int) *(fp)->ptr++ : __getc(fp))
- #define getchar() getc(stdin)
-
- #define putc(c, fp) ((fp)->cnt-- > 1 ? (int) (*(fp)->ptr++ = (c)) : __putc(c, fp))
- #define putchar(c) putc(c, stdout)
-
- #define ferror(fp) ((int) (fp)->err)
- #define feof(fp) ((int) (fp)->eof)
-